package com.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.dao.IndustryDetailDao;
import com.po.NewsDetailInfoPO;
@Controller
public class IndustryDetailAction implements ServletRequestAware{
	private HttpServletRequest request;
	@Autowired
	private IndustryDetailDao industryDetailDao;
	private NewsDetailInfoPO newsDetailInfo;	
	
	@Override
	public void setServletRequest(HttpServletRequest arg0) {
			this.request = arg0;
	}
	
	public String showInfo(){
		int id = Integer.parseInt(request.getParameter("id"));
		newsDetailInfo = industryDetailDao.findNewsDetailInfoById(id);
		
		return "industrydetail";
	}
	
	
	
	
	
	
	public NewsDetailInfoPO getNewsDetailInfo() {
		return newsDetailInfo;
	}
	public void setNewsDetailInfo(NewsDetailInfoPO newsDetailInfo) {
		this.newsDetailInfo = newsDetailInfo;
	}
	
	
}
